import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '主题',
    align: "center",
    dataIndex: 'title'
  },
  {
    title: '开始时间',
    align: "center",
    dataIndex: 'beginTime'
  },
 /* {
    title: '主播人',
    align: "center",
    dataIndex: 'mainId'
  },*/

  {
    title: '主播人',
    align: "center",
    dataIndex: 'mainId_dictText'
  },
  {
    title: '直播图片',
    align: "center",
    dataIndex: 'liveUrl'
  },
  {
    title: '状态',
    align: "center",
    dataIndex: 'state_dictText'
  },
  {
    title: '是否启用',
    align: "center",
    dataIndex: 'isEnabled',
    customRender:({text}) => {
       return  render.renderSwitch(text, [{text:'是',value:'Y'},{text:'否',value:'N'}]);
     },
  },
];

// 高级查询数据
export const superQuerySchema = {
  title: {title: '主题',order: 0,view: 'text', type: 'string',},
  beginTime: {title: '开始时间',order: 2,view: 'datetime', type: 'string',},
  mainId: {title: '主播人',order: 3,view: 'number', type: 'number',},
  liveUrl: {title: '直播地址',order: 4,view: 'text', type: 'string',},
  state: {title: '状态',order: 5,view: 'list', type: 'string',dictCode: 'live_state',},
  isEnabled: {title: '是否启用',order: 6,view: 'switch', type: 'string',},
};
